package jdbcDemo;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class DBUtil {

    private static final String URL = "jdbc:mysql://localhost:3306/Information";
    private static final String USER = "root";
    private static final String PASSWORD = "123456";
    private static Connection conn = null;

    public static void connetcDB() {

        try {

            conn = DriverManager.getConnection(URL,USER,PASSWORD);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public  static Connection getConn() {
        return conn;
    }
}


